import {del, get, post, postByFormData, put} from './http'

//上传图片
export const uploadImage = param => postByFormData('api/upload/uploadImage', param)
//上传多张图片
export const uploadMultipleImages = param => postByFormData('api/upload/uploadMutipleImages', param)
//----------------------    商品  ----------------------
//获取货号
export const getProductCode = param => get('api/products/getProductCode', param)
//获取该用户曾经输入的尺寸
export const getUserSizes = param => get('api/products/getUserSizes', param)
//获取该用户曾经输入的配件
export const getUserAccesories = param => get('api/products/getUserAccesories', param)
//获取不同状态的产品数量
export const getProductStatusCount = param => get('api/products/getProductStatusCount', param)
//获取所有商品列表：拟入库/正式入库/已下架
export const getAllProducts = param => post('api/products/getAllProducts', param)
//查看商品详情
export const viewProductDetail = param => get('api/products/viewProductDetail', param)
//查询商品
export const searchProduct = param => post('api/products/searchProduct', param)
//添加商品
export const createProduct = param => post('api/products/createProduct', param)
//修改商品信息
export const editProduct = param => put('api/products/editProduct', param)
//删除商品
export const deleteProduct = param => del('api/products/deleteProduct', param)
//
export const generateProductBarcode = param => post('api/products/generateProductBarcode', param)
//
export const refreshProduct = param => post('api/products/refreshProduct', param)
//
export const changeProductStatus = param => put('api/products/changeProductStatus', param)
//
export const downloadProductInfo = param => get('api/products/downloadProductInfo', param)
//通过productcode 获取产品信息
export const getProductByCode = param => post('api/products/getProductBycode', param)
//通过productcode 获取产品信息
export const refreshSpecificProduct = param => put('api/products/refreshSpecificProduct', param)
//https://api.ahlishop.com/api/products/downloadVideo/{{product_id}}
export const downloadVideo = param => get('api/products/downloadVideo', param)
//----------------------    待办  ----------------------
//获取不同状态的任务数量
export const getTaskStatusCount = param => get('api/task/getTaskStatusCount', param)
//获取所有需要代办/完成的任务
export const viewAllTasks = param => post('api/task/viewAllTasks', param)
//创建的任务
export const createTask = param => post('api/task/createTask', param)
//修改任务
export const editTask = param => put('api/task/editTask', param)
//删除任务
export const deleteTask = param => del('api/task/deleteTask', param)
//获取任务详细信息
export const viewTaskDetail = param => get('api/task/viewTaskDetail', param)
//修改任务状态为已完成
export const changeTaskStatusToDone = param => post('api/task/changeTaskStatusToDone', param)
//----------------------    订单  ----------------------
//获取不同状态的订单数量
export const getOrderStatusCount = param => get('api/order/getOrderStatusCount', param)
//获取所有订单:有余款/待核款/待发货/待自提/已发货/寄卖待结/已完成
export const getAllOrders = param => post('api/order/getAllOrders', param)
//将产品添加到订单中
export const createOrders = param => post('api/order/createOrder', param)
//修改订单
export const editOrder = param => put('api/order/editOrder', param)
//查看订单详情
export const viewOrderDetail = param => get('api/order/viewOrderDetail', param)
//删除订单
export const deleteOrder = param => del('api/order/deleteOrder', param)
//确认收到全款，确认发货，已发单号
export const changeOrderStatus = param => put('api/order/changeOrderStatus', param)
//----------------------    报表  ----------------------
//获取现在库存统计
export const getCurrentStockSummary = param => get('api/report/getCurrentStockSummary', param)
//获取本月总销售记录
export const getCurrentMonthSaleSummary = param => get('api/report/getCurrentMonthSaleSummary', param)
//获取月销售记录
export const getSaleSummaryByMonth = param => post('api/report/getSaleSummaryByMonth', param)
//获取一段时间的销售记录
export const getSaleSummaryBySelectedDate = param => post('api/report/getSaleSummaryBySelectedDate', param)
//获取所有人现阶段销售记录-老板页面
export const getPersonalSummaryCurrentDuration = param => get('api/report/getPersonalSummaryCurrentDuration', param)
//获取所有人从开始的销售记录-老板页面
export const getPersonalSummaryFromStart = param => get('api/report/getPersonalSummaryFromStart', param)
//查看销售本月销售详细
export const viewTraderSaleSummaryCurrentMonth = param => get('api/auth/viewTraderSaleSummaryCurrentMonth', param)
//查看销售总销售详细
export const viewTraderSaleSummaryTotal = param => get('api/auth/viewTraderSaleSummaryTotal', param)
//查看销售员业绩-订单详情,已完成的订单
export const viewOrderDetailsReport = param => post('api/auth/viewOrderDetailsReport', param)
//----------------------    员工  ----------------------
//获取所有在职员工，离职员工数量
export const getActiveAndInactiveCount = param => get('api/auth/getActiveAndInactiveCount', param)
//获取所有在职员工
export const getActiveStaff = param => post('api/auth/getActiveStaff', param)
//获取所有离职员工
export const getInactiveStaff = param => post('api/auth/getInactiveStaff', param)
//获取个人信息/查看用户详细信息
export const getMyProfile = param => get('api/auth/getMyProfile', param)
//创建新员工
export const addStaff = param => post('api/auth/register', param)
//修改员工信息
export const editStaff = param => put('api/auth/editUser', param)
//修改密码
export const changePassword = param => put('api/auth/changePassword', param)
//办理离职
export const setInactive = param => put('api/auth/setInactive', param)
//----------------------    授权  ----------------------
//用户登陆
export const userLogIn = param => post('api/auth/login', param)
//退出登陆
export const userLogOut = param => get('api/auth/logout', param)
//获取邮箱验证码
export const getEmailVerifyCode = param => get('api/auth/sendVerifyCode', param)
//检测邮箱验证码是否正确
export const checkVerifyCode = param => post('api/auth/checkVerifyCode', param)
//忘记密码
export const forgotPassword = param => put('api/auth/forgotPassword', param)